import request from '@/utils/request'

export function getFriendList(userId) {
    return request({
        url: '/friend/list',
        method: 'get',
        params: { userId }
    })
}

export function findFriendByUserName(username) {
    return request({
        url: '/friend/friend',
        method: 'get',
        params: { username }
    })
}

export function addFriend(query) {
    return request({
        url: '/friend/friend',
        method: 'post',
        params: query
    })
}

export function deleteFriend(query) {
    return request({
        url: '/friend/friend',
        method: 'delete',
        params: query
    })
}

export function agreeAddFriend(query) {
    return request({
        url: '/friend/agree',
        method: 'post',
        params: query
    })
}


export function rejectAddFriend(query) {
    return request({
        url: '/friend/reject',
        method: 'post',
        params: query
    })
}

